package com.woniuxy.intellihome.mapper;

import com.woniuxy.intellihome.entity.Region;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.intellihome.provider.RegionProvider;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2021-08-11
 */
public interface RegionMapper extends BaseMapper<Region> {
    @SelectProvider(type = RegionProvider.class, method = "select")
    public List<Region> getByPid(Region region);

    @Select("select name from m_region where id= #{id}")
    public String getNameById(Integer id);
}
